1. Field of the Invention
The present invention relates to a numerical controller and especially relates to a numerical controller which is capable of increasing the number of analysis digits of a program instruction.
2. Description of the Related Art
In general, in internal operation of a numerical controller, the number of decimal places to be interpreted is preliminarily set in interpretation of an axis instruction (X123.456789, for example) in a program instruction (for example, see Japanese Patent Application Laid-Open No. 8-328635, Japanese Patent Application Laid-Open No. 63-269204, Japanese Patent Application Laid-Open No. 05-181522, Japanese Patent Application Laid-Open No. 05-282022, and Japanese Patent Application Laid-Open No. 11-175229). This setting value is referred to below as the “minimum setting unit”.
The number of decimal places can be described in more detail than the minimum setting unit as a program format (X123.45678912, for example). Therefore, a numerical controller handles a program instruction in a manner to round an instructed digit after the decimal point at the minimum setting unit, irrespective of an instruction of the number of decimal places in the program instruction.
The minimum setting unit is determined based on the following external factors and internal factors of a numerical controller.
[External Factor 1: Limit by Display Region and Input Region on screen]
If the number of decimal places which is set in the minimum setting unit is increased so as to enable interpretation of a coordinate position of more number of digits, for example, in a numerical controller, the number of instruction digits for each value is increased. If the number of instruction digits is excessively increased, the number of digits for program display or position display, for example, is excessively increased, causing complicated management. Further, parameters, offset data, and the like are often linked with the minimum setting unit, so that the number of digits for parameters, offset data, or the like is also increased more than necessary disadvantageously.
[External Factor 2: Limit by Stroke Length of Machine and Stroke Length Which can be Set for Every Setting Unit]
A machine needs the stroke length corresponding to the size of a machining region. If the number of decimal places which is set in the minimum setting unit is increased while maintaining the stroke length, the data length (number of bits) required for one value has to be increased in internal operation. On the other hand, if the number of decimal places which is set in the minimum setting unit is increased while fixing the data length of one value in internal operation, the stroke length has to be decreased.
[External Factor 3: Limit by Resolution of Detector]
In the case where the number of decimal places which is set in the minimum setting unit is increased so as to enable interpretation of more number of digits than resolution of a position detector which detects a position of a workpiece or a position of a tool in a machining region, even if a coordinate position of more number of digits is instructed in a program, the detector is not capable of detecting the minimum digit of the instructed coordinate position. Thus, it is impossible to precisely perform positioning on the instructed coordinate position of more number of digits. On the other hand, in the case where the number of decimal places set in the minimum setting unit is larger than resolution of a detector, enhancement of precision can be expected by increasing the number of decimal places which is set in the minimum setting unit within a range of the resolution of the detector.
[Internal Factor 1: Limit by Register Length in Operation Register of Numerical Controller]
In the case where the register length of operation register is 32 bits, a range from −2147483648 to +2147483647 can be expressed when a signed single integer is used to express one value. Here, in the case where one value in mm unit is expressed by a signed single integer with the minimum setting unit of six digits after the decimal point in internal operation of the numerical controller having the register length of 32 bits, a coordinate position in a range from −2147.483648 mm to +2147.483647 mm can be expressed. Further, in the case where one value in mm unit is expressed with the minimum setting unit of seven digits after the decimal point, a coordinate position in a range from −214.7483648 mm to +214.7483647 mm can be expressed. In the case where the number of decimal places set in the minimum setting unit is increased without changing a range of a stroke of a machine to be a control object in such numerical controller, it is required to use a signed double integer instead of a signed single integer.
[Internal Factor 2: Limit by Resources (Processing Time and Memory Consumption)]
As described in Internal factor 1 above, in the case where the number of decimal places set in the minimum setting unit is increased without changing the stroke length of a machine to be a control object, it is necessary to handle more data in internal operation, increasing processing time of operation or memory consumption by necessity. However, there is a limit in an operation speed or a data transfer speed of a CPU included in a numerical controller, so that processing for generating data for controlling the machine may not be completed within a cycle of a control operation if the number of operation digits is easily increased.
In a numerical controller, the number of decimal places set in the minimum setting unit is determined in a realistic range while studying the above-mentioned various factors in a comprehensive manner. For example, in the case where internal operation of a numerical controller is performed with a signed single integer of 32 bits, a coordinate position in a range from −2147.483648 mm to +2147.483647 mm (approximately ±2 m of stroke, as illustrated in FIG. 9) can be expressed when the minimum setting unit is set to six digits after the decimal point as described above. If the stroke of a machine to be a control object is in a range from −2 m to +2 m, no problem occurs in controlling of the machine. Therefore, the number of decimal places set in the minimum setting unit is set to six digits. Here, in FIG. 9, the reference numeral 2 denotes a tool and the reference numeral 3 denotes a workpiece which is placed on a table 4.
Here, in the case where resolution of a detector of a machine which is controlled by a numerical controller which is set as described above is equal to or smaller than 0.000001 mm, enhancement in precision can be expected by allowing the machine to interpret an instruction to a lower digit, perform operation, and perform final pulse distribution to lower digits. However, if the number of decimal places set in the minimum setting unit is merely set as 7 digits, the stroke which can be handled by the numerical controller is −214.7483648 to +214.7483647 (approximately ±0.2 m of stroke) as mentioned above. Therefore, even when ±2 m of stroke length of the machine is desired to be secured, the stroke becomes ±0.2 m at a maximum due to the limit of the numerical controller and thus, the machine does not function as a machine for performing machining. That is, even in the case when a control object is a high precision machine including a high precision detector, high precision machining cannot be performed if the numerical controller cannot handle this. On the other hand, a numerical controller which is provided with many resources and is capable of performing high precision interpretation of a value and high precision operation in internal operation thereof is expensive to require high cost for installation thereof.